//
//  SignUpViewModel.swift
//  ExtremeHealth
//
//  Created by Zhongkai Li 李忠凯 on 2018/9/21.
//  Copyright © 2018 GanDongKeJi. All rights reserved.
//

import RxSwift
import Toast

struct SignUpViewModel {
    func signUp(signUpType: String = "1",
                phoneNo: String = "13223929619",
                captcha: String = "736907",
                bag: DisposeBag) {
        Network.request(target:
            .signUp(signupType: signUpType,
                    phoneNo: phoneNo,
                    captcha: captcha,
                    userName: "",
                    password: ""
            ), success: { (json: LoginModel) in
            print(json)
        }, failure: { (moyaError) in
            EHToast.show(moyaError.localizedDescription)
        }, error: { (errorStr) in
            EHToast.show(errorStr)
        }, dispose: bag)
    }
}
